Tryit Editor v2.3

Edit This Code:
<!DOCTYPE html> <html> <head> <style> h2.pos_top { position: relative; top: -30px; } </style> </head> <body> <h2>Heading with no position</h2> <h2 class="pos_top">This heading is moved upwards according to its normal position</h2> <p><b>Note:</b> Even if the content of the relatively positioned element is moved, the reserved space for the element is still preserved in the normal flow.</p> </body> <!-- Mirrored from www.w3schools.com/css/tryit.asp?filename=trycss_position_relative2 by HTTrack Website Copier/3.x [XR&CO'2014], Fri, 23 Jan 2015 07:32:44 GMT --> </html>
Result:
Try it Yourself - © w3schools.com